#include "UnitTest++.h"

namespace
{

	static Font::Database* s_Instance = NULL;

	static Font::Database* GetLibrary()
	{
		if (!s_Instance) 
		{
			Font::Database::Get().Init();
			s_Instance = &Font::Database::Get();
		}

		return s_Instance;
	}

	TEST(FontCharMapRangeValid)
	{
		Font::CharMap* test_map = new Font::CharMap(s_Instance);
		test_map->AddKnownRange(10, 40);

		std::vector<Font::UnicodeRange*> test_ranges1;
		test_map->GetRangeInside(test_ranges1, 10, 20);

		std::vector<Font::UnicodeRange*> test_ranges2;
		test_map->GetRangeInside(test_ranges2, 0, 10);

		std::vector<Font::UnicodeRange*> test_ranges3;
		test_map->GetRangeInside(test_ranges3, 30, 40);

		std::vector<Font::UnicodeRange*> test_ranges4;
		test_map->GetRangeInside(test_ranges3, 0, 5);
	}

	TEST(FontCharMapRangeInvalidLeft)

}